<template>
  <div style="margin-left: 18px;">
  <el-tabs v-model="activeName">
      <el-tab-pane label="企业会员" name="first" v-if="first && userType">
          <shop-index ref="Index"/>
      </el-tab-pane>
      <el-tab-pane label="子账号" name="second"  v-if="second">
        <shop-sub-account ref="SubAccount"/>
      </el-tab-pane>
      <el-tab-pane label="用户认证" name="approve" v-if="approve">
        <approve ref="approve"/>
      </el-tab-pane>
  </el-tabs>
  </div>
</template>
<script>
  import shopIndex from "./index";
  import auth from '@/plugins/auth'
  import shopSubAccount from "./sub-account";
  import approve from "./approve";
  export default {
    name: "Tabs",
    components: { shopIndex,shopSubAccount,approve },
    data() {
      return {
        second : auth.hasPermi("zhcloud:sub:list"),
        first : auth.hasPermi("zhcloud:shop:list"),
        approve : auth.hasFounder(),
        userType : auth.hasUserType(),
        activeName: 'first'
      }
    }
  };
</script>
